header simpleUART
{
	// A simple UART received, by Mauro Grassi.

}

script simpleUART
{
	// Create A new Log File for this script from scratch, named "uart simple log.txt"

	clearFile "UART simple log.txt";

	// Initialise the UART, pin D5 is Tx, pin D4 is Rx...
	// Baudrate 4800 bps is the default for the GPS module...

	@@openUART(0, 4800, #D5, #D4);

        print "Waiting for Serial Port Input...", newline;

	while(1)
	{
		if(@@newRxUART())
		{
			$size=@@getSizeUART();
			print "Size: ", $size, newline;
			print "[", pf(#serialInPipe), "]", newline;
			if($size>64)@@clearUART();
		}
	
	}
}
